<script setup>
import { ref } from "vue";

const count = ref(0);
defineProps(["title", "name"]);
</script>

<template>
  <h2>子组件</h2>
  <button @click="count++" class="button">
    You clicked me {{ count }} times.
  </button>
  <span>{{ title }}</span>
  <span>{{ name }}</span>
</template>

<style scoped>
.button {
  color: red;
}
</style>
